package com.csproj.basic.domain;


import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.ZonedDateTime;
import java.util.Objects;


/**
 * A Warehouse.
 */
@Entity
@Table(name = "t_base_warehouse")
@EntityListeners(AuditingEntityListener.class)
public class Warehouse implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    @Column(name = "id")
    private String id;

    @Column(name = "house_name")
    private String houseName;

    @Column(name = "address")
    private String address;

    @Column(name = "site_id")
    private String siteId;

    public Boolean getEnableFlag() {
        return enableFlag;
    }

    public void setEnableFlag(Boolean enableFlag) {
        this.enableFlag = enableFlag;
    }

    @Column(name = "enable_flag")
    private Boolean enableFlag;

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    @Column(name = "reason")
    private String  reason;

    public String getManagerName() {
        return managerName;
    }

    public void setManagerName(String managerName) {
        this.managerName = managerName;
    }

    @Column(name="manager_name")
    private String managerName;

    @Column(name = "manager_phone")
    private String managerPhone;

    @Column(name = "house_phone")
    private String housePhone;

    @Column(name = "status")
    private Integer status;

    @Column(name = "lng")
    private BigDecimal lng;

    @Column(name = "lat")
    private BigDecimal lat;

    @Column(name = "radius")
    private BigDecimal radius;

    @Column(name = "deleted_flag")
    private Boolean deletedFlag;

    @Column(name = "deleter_user_id")
    private String deleterUserId;

    @Column(name = "deletion_time")
    private ZonedDateTime deletionTime;

    @Column(name = "last_modification_time")
    private ZonedDateTime lastModificationTime;

    @Column(name = "last_modifier_user_id")
    private String lastModifierUserId;

    @CreatedDate
    @Column(name = "creation_time")
    private ZonedDateTime creationTime;

    @CreatedBy
    @Column(name = "creator_user_id")
    private String creatorUserId;

    // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getHouseName() {
        return houseName;
    }

    public Warehouse houseName(String houseName) {
        this.houseName = houseName;
        return this;
    }

    public void setHouseName(String houseName) {
        this.houseName = houseName;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public BigDecimal getLng() {
        return lng;
    }

    public void setLng(BigDecimal lng) {
        this.lng = lng;
    }

    public BigDecimal getLat() {
        return lat;
    }

    public void setLat(BigDecimal lat) {
        this.lat = lat;
    }

    public BigDecimal getRadius() {
        return radius;
    }

    public void setRadius(BigDecimal radius) {
        this.radius = radius;
    }

    public String getSiteId() {
        return siteId;
    }

    public Warehouse siteId(String siteId) {
        this.siteId = siteId;
        return this;
    }

    public void setSiteId(String siteId) {
        this.siteId = siteId;
    }

    public String getManagerPhone() {
        return managerPhone;
    }

    public Warehouse managerPhone(String managerPhone) {
        this.managerPhone = managerPhone;
        return this;
    }

    public void setManagerPhone(String managerPhone) {
        this.managerPhone = managerPhone;
    }

    public String getHousePhone() {
        return housePhone;
    }

    public Warehouse housePhone(String housePhone) {
        this.housePhone = housePhone;
        return this;
    }

    public void setHousePhone(String housePhone) {
        this.housePhone = housePhone;
    }

    public Integer getStatus() {
        return status;
    }

    public Warehouse status(Integer status) {
        this.status = status;
        return this;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Boolean isDeletedFlag() {
        return deletedFlag;
    }

    public Warehouse deletedFlag(Boolean deletedFlag) {
        this.deletedFlag = deletedFlag;
        return this;
    }

    public void setDeletedFlag(Boolean deletedFlag) {
        this.deletedFlag = deletedFlag;
    }

    public String getDeleterUserId() {
        return deleterUserId;
    }

    public Warehouse deleterUserId(String deleterUserId) {
        this.deleterUserId = deleterUserId;
        return this;
    }

    public void setDeleterUserId(String deleterUserId) {
        this.deleterUserId = deleterUserId;
    }

    public ZonedDateTime getDeletionTime() {
        return deletionTime;
    }

    public Warehouse deletionTime(ZonedDateTime deletionTime) {
        this.deletionTime = deletionTime;
        return this;
    }

    public void setDeletionTime(ZonedDateTime deletionTime) {
        this.deletionTime = deletionTime;
    }

    public ZonedDateTime getLastModificationTime() {
        return lastModificationTime;
    }

    public Warehouse lastModificationTime(ZonedDateTime lastModificationTime) {
        this.lastModificationTime = lastModificationTime;
        return this;
    }

    public void setLastModificationTime(ZonedDateTime lastModificationTime) {
        this.lastModificationTime = lastModificationTime;
    }

    public String getLastModifierUserId() {
        return lastModifierUserId;
    }

    public Warehouse lastModifierUserId(String lastModifierUserId) {
        this.lastModifierUserId = lastModifierUserId;
        return this;
    }

    public void setLastModifierUserId(String lastModifierUserId) {
        this.lastModifierUserId = lastModifierUserId;
    }

    public ZonedDateTime getCreationTime() {
        return creationTime;
    }

    public Warehouse creationTime(ZonedDateTime creationTime) {
        this.creationTime = creationTime;
        return this;
    }

    public void setCreationTime(ZonedDateTime creationTime) {
        this.creationTime = creationTime;
    }

    public String getCreatorUserId() {
        return creatorUserId;
    }

    public Warehouse creatorUserId(String creatorUserId) {
        this.creatorUserId = creatorUserId;
        return this;
    }

    public void setCreatorUserId(String creatorUserId) {
        this.creatorUserId = creatorUserId;
    }
    // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Warehouse warehouse = (Warehouse) o;
        if (warehouse.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), warehouse.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "Warehouse{" +
                "id='" + id + '\'' +
                ", houseName='" + houseName + '\'' +
                ", address='" + address + '\'' +
                ", siteId='" + siteId + '\'' +
                ", managerPhone='" + managerPhone + '\'' +
                ", housePhone='" + housePhone + '\'' +
                ", status=" + status +
                ", lng=" + lng +
                ", lat=" + lat +
                ", radius=" + radius +
                ", deletedFlag=" + deletedFlag +
                ", deleterUserId='" + deleterUserId + '\'' +
                ", deletionTime=" + deletionTime +
                ", lastModificationTime=" + lastModificationTime +
                ", lastModifierUserId='" + lastModifierUserId + '\'' +
                ", creationTime=" + creationTime +
                ", creatorUserId='" + creatorUserId + '\'' +
                '}';
    }
}
